3.122. <StatsLog xxxxxx>

This marks the beginning of a StatsLog clause, which defines how to log statistics from Radiator internal objects. The xxxxxx is the name of a specific StatsLog module. For more about Diameter statistics and how to configure logging them, see Section 3.126. <DiaStatsLog xxxxxx>. This section lists the configuration parameters all StatsLogs and DiaStatsLogs use and describes StatsLog statistics in detail.
StatsLogs may also use additional parameters that are specific for that StatsLog. StatsLog clauses are defined at the top level configuration.
Radiator collects statistics for the server as a whole, as well as for each Client, Realm, Handler, AuthBy, and Host that a packet passes through. The following statistics are collected for each object or clause:

Table 10. Statistics collected within Radiator and usage in Format parameter

Symbolic name Description Format character
requests Total requests %22
droppedRequests Total dropped requests %14
duplicateRequests Total duplicate requests %17
proxiedRequests Total proxied requests %21
proxiedNoReply Total proxied requests with no reply %20
badAuthRequests Total Bad authenticators in requests %11
responseTime Average response time (seconds). This is a cumulative moving average of the per-request elapsed processing time for the last 100 requests. %23
accessRequests Access requests %6
dupAccessRequests Duplicate access requests %15
accessAccepts Access accepts %3
accessRejects Access rejects %5
accessChallenges Access challenges %4
malformedAccessRequests Malformed access requests %18
badAuthAccessRequests Bad authenticators in authentication requests %9
droppedAccessRequests Dropped access requests %12
accountingRequests Accounting requests %7
dupAccountingRequests Duplicate accounting requests %16
accountingResponses Accounting responses %8
malformedAccountingRequests Malformed accounting requests %19
badAuthAccountingRequests Bad authenticators in accounting requests %10
droppedAccountingRequests Dropped accounting requests %13
In the case of AuthBy clauses you should set a unique Identifier in each clause, otherwise you will not necessarily be able to distinguish between each AuthBy clause in StatsLog statistics.
responseTime measures the per-request processing time, the time required for Radiator to fully process a single request. It does not measure the Access-Request/ Access-Accept delay. For more information about how responseTime is calculated, see Table 10. Statistics collected within Radiator and usage in Format parameter.
responseTime will be computed based on time measurements accurate to 1 microsecond when Time::HiRes module is available. This should be the case with all modern Perl versions.

3.122.1. Interval

This is the time interval (in seconds) between each set of statistics. The default value is 600 seconds (10 minutes).
# Log once per day
Interval 86400

3.122.2. StatsType

By default statistics produce counter, for example cumulative, values. You can change this with StatsType parameter. Format specifiers, such as %{GlobalVar:name}, are evaluated when the configuration is loaded. The parameter value is the output type and can be one of:
  • cumulative: cumulative counter shows the number of processed packets.
  • derivative: derivative is the difference (delta) between two counter values in time interval.
  • packet_rate: packet rate is the amount of packets transferred within time interval (packets per second).
  • all: all produces output from all available statistic types (cumulative, derivative and packet_rate).
The default output type is cumulative.
# We are interested in the difference (delta)
StatsType derivative

3.122.3. RateCalculationInterval

This is used to calculate packet rates that are different from the value of Interval. RateCalculationInterval is an optional parameter that defines the time interval (in seconds) in which the packet rate is calculated. For example, if Interval is set to 600 seconds and RateCalculationInterval is set to 60, statistics is dumped in every 600 seconds but packet rate shows the average amount of packets in 60 second interval.
Calculated example: Amount of packets in Interval (600 s) is 1000 pkts and RateCalculationInterval is one minute (60 s). (1000 pkts/10 min) * (60 s/min) / (600 s/10 min) = 100 pkts/min.
RateCalculationInterval defaults to 1 (packets per second).
# We are interested in packets per minute
RateCalculationInterval 60

3.122.4. OutputFormat

This string defines the format of statistics entries. Format specifiers, such as %{GlobalVar:name}, are evaluated when the configuration is loaded. The value can be either text or json. The default value is text unless otherwise documented by a clause.
<StatsLog FILE>
    # Log as json instead of text
    OutputFormat json

    # Other configuration options

3.122.5. StatsExcludeObject

By default statistics include all Client, Handler and other objects that support statistics collection. StatsExcludeObject supports a comma separated list of the following object types:
  • Client: Skip all Clients, including those loaded with ClientList clauses.
  • Handler: Skip all Handler clauses.
  • Realm: Skip all Realm clauses.
Currently all AuthBys within skipped Handler and Realm clauses are also skipped. How AuthBys are excluded may change in the future releases. To define exceptions, see Section 3.122.6. StatsInclude.
# We don't want to see any client statistics
StatsExcludeObject Client

3.122.6. StatsInclude

StatsInclude allows defining exceptions for statistics objects that would be otherwise skipped by StatsExcludeObject configuration parameter. StatsInclude value specifies a type and value separated by a comma. The following types are supported:
  • Client, name: Include Client clause that matches <Client name> configuration clause
  • Client-Identifier, identifier: Include Client clause with Identifier identifier configured
  • Handler, identifier: Include Handler clause with Identifier identifier configured.
  • Realm, identifier: Include Realm clause with Identifier identifier configured.
For more about excluding objects from statistics, see Section 3.122.5. StatsExcludeObject. StatsInclude is ignored when the type is not defined with StatsExcludeObject.
# We don't want to see client statistics, except for these two
StatsExcludeObject Client
StatsInclude Client,
StatsInclude Client-Identifier, bgn-gateway

3.122.7. FarmWorkerSpacing

If this optional parameter is set to non-zero, it specifies the time in seconds for spacing out logging done by server farm workers. Defaults to not set which causes all farm workers to log statistics at the same moment. This parameter has only effect when both Interval and global FarmSize parameters are configured.
# Log once per day, use 30 second offset between each worker
Interval 86400
FarmWorkerSpacing 30