Health Checks

The SDK contains health checks that can be performed on various services. This page will cover all the different health checks that can performed via Consul with the appropriate structure content for each of them.

SDK Health Check

Upon using consul, it is possible to get the health check of the service named SDK Health Check. A JSON structure is then received with data in it.

HealthCheck

A health check from consul.

Object Properties:
 
  • Node (string) – Name of the node used by the service
  • CheckID (string) – Id to identify the type
  • Name (string) – CheckID with name of the service
  • Status (string) – Status of the service
  • Notes (string) – Notes related to the service
  • Output (string) – Output associated to the service
  • ServiceID (string) – Id of the service
  • ServiceName (string) – Name of the service
JSON Example
{
    "Node": "gwegrarWGYWrGOAJcfTh",
    "CheckID": "xXQkEmVApuQxtxBcUlBe",
    "Name": "fNStMAqBnMOkhZeUeEFA",
    "Status": "EMqhzmGbCnQWypNobNpH",
    "Notes": "omZkKsXweoPCzHWslmvD",
    "Output": "MowMwHfUjpoPZUKELYHm",
    "ServiceID": "KHRfbkKxAYnBHkGSMaOF",
    "ServiceName": "eAGnkeNojGAaqGPVyeAX"
}

This structure is common for any service, but the Output string can be serialized into a JSON structure depending on which service was called. In this case, we can serialize it into a HealthCheckOutput structure.

HealthCheckOutput

Output associated to the service Health Check SDK.

Object Properties:
 
JSON Example
{
    "Config": {
        "Encode": {
            "Input": {
                "Height": 5347,
                "Quality": "{number object}",
                "Silent": true,
                "StampScale": "{number object}",
                "StampTimecode": false,
                "Width": 1688
            }
        }
    },
    "State": {
        "ComposeConnected": false,
        "NatsConnected": true,
        "NumStreams": 7265
    }
}

HealthConfig

HealthConfig

Health Check Output configuration.

Object Properties:
 
JSON Example
{
    "Encode": {
        "Input": {
            "Height": 283,
            "Quality": "{number object}",
            "Silent": true,
            "StampScale": "{number object}",
            "StampTimecode": true,
            "Width": 9982
        }
    }
}

HealthConfigEncode

HealthConfigEncode

Health Configuration Encode

Object Properties:
 
JSON Example
{
    "Input": {
        "Height": 3729,
        "Quality": "{number object}",
        "Silent": false,
        "StampScale": "{number object}",
        "StampTimecode": false,
        "Width": 1227
    }
}

HealthConfigEncodeInput

HealthConfigEncodeInput

Health Configuration Encode Input

Object Properties:
 
  • Height (integer) – Height of the video
  • Quality (number) – Quality percentage of the video
  • Silent (boolean) – Enable/disable the audio being silent
  • StampScale (number) – Scale used to stamp the frames
  • StampTimecode (boolean) – Enable/disable to stamp the frames with a timecode
  • Width (integer) – Width of the video
JSON Example
{
    "Height": 4896,
    "Quality": "{number object}",
    "Silent": true,
    "StampScale": "{number object}",
    "StampTimecode": true,
    "Width": 7039
}

HealthState

HealthState

Health Check Output state

Object Properties:
 
  • ComposeConnected (boolean) – Compose connection status
  • NatsConnected (boolean) – Nats connection status
  • NumStreams (integer) – Number of streams connected
JSON Example
{
    "ComposeConnected": false,
    "NatsConnected": true,
    "NumStreams": 5605
}