Skip to main content
Version: Next

activity

Internal Operator

This operator is only for internal usage by the Tenzir Platform. It can change without notice.

Summarizes the activity of pipelines.

pipeline::activity range=duration, interval=duration

Description

range = duration

The range for which the activity should be fetched. Note that the individual rates returned by this operator typically represent a larger range because they are aligned with the interval.

interval = duration

The interval used to summarize the individual throughout rates. Needs to be a multiple of the built-in storage interval, which is typically 10min. Also needs to cleanly divide range.

Schemas

tenzir.activity

FieldTypeDescription
firsttimeThe time of the first throughput rate in the lists below.
lasttimeThe time of the last throughput rate in the lists below.
pipelineslist<record>The activity for individual pipelines.

The records in pipelines have the following schema:

FieldTypeDescription
idstringThe ID uniquely identifying the pipeline this activity belongs to.
ingressrecordThe activity at the source of the pipeline.
egressrecordThe activity at the destination of the pipeline.

The records ingress and egress have the following schema:

FieldTypeDescription
internalboolWhether this end of the pipeline is considered internal.
bytesuint64The total number of bytes over the range.
rateslist<uint64>The throughput in bytes/second over time.

You can derive the time associated with a given throughput rate with the formula first + index*interval, except the last value, which is associated with last. The recommended way to chart these values is to show a sliding window over [last - range, last]. The value in bytes is an approximation for the total number of bytes inside that window.

Examples

Show the activity over the last 20s

pipeline::activity range=20s, interval=20s
{
  first: 2025-05-07T08:33:40.000Z,
  last: 2025-05-07T08:34:10.000Z,
  pipelines: [
    {
      id: "3b43d497-5f4d-47f4-b191-5f432644d5ba",
      ingress: {
        internal: true,
        bytes: 289800,
        rates: [
          14490,
          14490,
          14490,
        ],
      },
      egress: {
        internal: true,
        bytes: 292360,
        rates: [
          14721.75,
          14514.25,
          14488.8,
        ],
      },
    },
  ],
}