Send health data over HTTP

Overview

SUSE Observability can synchronize health information from your own data sources either via HTTP or the SUSE Observability CLI.

A service token must be used instead of API key as they are synonymous.

SUSE Observability Receiver API

The SUSE Observability Receiver API accepts topology, metrics, events and health data in a common JSON object. The default location for the receiver API is the <STACKSTATE_RECEIVER_API_ADDRESS>, constructed using the <STACKSTATE_BASE_URL> and <STACKSTATE_RECEIVER_API_KEY>.

The <STACKSTATE_RECEIVER_API_ADDRESS> for SUSE Observability deployed on Kubernetes or OpenShift is:

https://<STACKSTATE_BASE_URL>/receiver/stsAgent/intake?api_key=<STACKSTATE_SERVICE_TOKEN>

The <STACKSTATE_BASE_URL> and <STACKSTATE_RECEIVER_API_KEY> are set during SUSE Observability installation, for details see Kubernetes install - configuration parameters.

JSON

Common JSON object

Topology, telemetry and health data are sent to the receiver API via HTTP POST. There is a common JSON object used for all messages.

{
  "collection_timestamp": 1548855554, // the epoch timestamp for the collection
  "events": {}, // used to send events data
  "internalHostname": "localdocker.test", // the host sending this data
  "metrics": [], // used to send metrics data
  "service_checks": [],
  "topologies": [], // used to send topology data
  "health": // used for sending health data
}

JSON health payload

SUSE Observability accepts health data based on a chosen consistency model. The message that can be sent for each model are described on the pages below:

Silence an external health result

To mark an external health result as muted, add a silenced object to its entry in check_states. The object requires a note string that explains the reason. This format works with both Repeat Snapshots and Transactional Increments.

{
  "checkStateId": "disk-usage",
  "name": "Disk Usage",
  "health": "Critical",
  "topologyElementIdentifier": "server-1",
  "message": "Disk usage exceeds the threshold",
  "silenced": {
    "note": "Disk expansion in progress"
  }
}

Include silenced in each update while the result is muted. To end external silencing, send an update for the same check state without silenced. For Repeat Snapshots, keep the check state in the snapshot. Removing the whole check state deletes it instead.

The health value stays unchanged. SUSE Observability records the silencing start time when it processes the external data. External silencing has no local expiry and must end at the source. Any separate silencing rule in SUSE Observability can still keep the result muted. See Silencing for the effect on component state.