Skip to content

Stat

Stat is data gathered during the monitoring process.

Stat Model

Field Type Description
groupKey Integer, String Key to group data packets and make server to process them in a strict sequence.
expiryPeriod Integer How long the sent data packet is valid (ms).
payload JSON required 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
}
{
    "groupKey": "gk_893",
    "payload": {
        "statusCode": 200
    },
    "period": 60000,
    "timestamp": 1620719755782
}

Shortened Stat

As all of the fields except payload are optional it's possible to send shortened version of the stat. Please compare with the examples above:

{
    "statusCode": 200
}