Repeat States JSON
StackState Self-hosted v5.0.x
This page describes StackState version 5.0.
Overview
This page describes the exact JSON messages that can be sent for the health synchronization Repeat States consistency model.
JSON property: "health"
Health can be sent to the StackState Receiver API using the "health"
property of the common JSON object.
Every health Repeat States data payload has the following details:
expiry - Optional. An expiry update needs to be processed before processing
check_states
. This enables StackState to track how long the external checks should be present in the system if they are not sent again. It carries the following fields as expiry metadata:repeat_interval_s - Time in seconds. The frequency with which the external source will send health data to StackState. Max allowed value is 1800 (30 minutes).
expiry_interval_s - Time in seconds. The time to wait after the last update before an external check is deleted by StackState if the external check is not observed again.
stream - Object providing identification regarding which snapshots and
check_states
belong together. It contains the following fields:urn - Data source and stream ID encoded as a StackState URN that matches the following convention:
urn:health:<sourceId>:<streamId>
where<sourceId>
is the name if the external data source and<streamId>
is a unique identifier for the health data stream.sub_stream_id - Optional. Identifier for a sub set of the stream health data. When the stream data is distributed and reported by several agents, this allows snapshot lifecycles per
sub_stream_id
check_states - A list of check states. Each check state can have the following fields:
checkStateId - Identifier for the check state in the external system
message - Optional. Message to display in StackState UI. Data will be interpreted as markdown allowing to have links to the external system check that generated the external check state.
health - One of the following StackState Health state values:
Clear
,Deviating
,Critical
.topologyElementIdentifier - Used to bind the check state to a StackState topology element.
name - Name of the external check state.
Send health to StackState
Health can be sent in one JSON message via HTTP POST or using the stac
CLI command stac health send
. In the example below, a snapshot containing two check states is sent to StackState from a single external monitoring system.
Last updated