Stat

Stat is data gathered during the monitoring process.

Stat Model

Field Type Description

expiryPeriod

Integer

How long the sent data packet is valid (ms).

groupKey

Integer, String

Key to group data packets and make server to process them in a strict sequence.

initiator

String

Actor that changed the payload.

lastPayload

Object

Previous payload data. When the stat is changed by either an agent or REST API, the system records previous payload in this field.

payload

Object

Any JSON-encoded data you wish the server to process and store.

period

Integer

The sum of values in this field and in server’s config file defines how long the sent data packet is valid (ms). If period isn’t provided, only the server’s value will be applied. These ones will be ignored if expiryPeriod is provided.

timestamp

Integer

UNIX timestamp in ms.

Examples

Fully Qualified Stat

{
    "groupKey": "gk_893",
    "expiryPeriod": 60000,
    "payload": {
        "statusCode": 200
    },
    "timestamp": 1620719755782
}

Shortened Stat

All fields except payload are optional, so it’s possible to send shortened version of the stat:

{
    "statusCode": 200
}