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
{ "Node": "VQXbKcviyVWgSNynXRKG", "ServiceID": "tGpUAiTJMfmGdjmtMaKB", "Output": "dIGIECiJLGPPxgJrBXjK", "Notes": "RjYuNnutVZExRTcONzPZ", "Status": "UwXLLWeAlMTaawRSJhhV", "Name": "wfNFGHIhxmWEYnmzwaIF", "ServiceName": "XEAlyyNWtmOnuQgYrVSw", "CheckID": "MOLgyLXaVUxRaBkfOePb" }
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: - Config (
HealthConfig
) – Health Check Output configuration - State (
HealthState
) – Health Check Output state
{ "Config": { "Encode": { "Input": { "Width": 3375, "Silent": false, "Quality": "{number object}", "StampTimecode": true, "Height": 1025, "StampScale": "{number object}" } } }, "State": { "ComposeConnected": false, "NumStreams": 5106, "NatsConnected": false } }
- Config (
HealthConfig¶
-
HealthConfig
Health Check Output configuration.
Object Properties: - Encode (
HealthConfigEncode
) – Health Configuration Encode
{ "Encode": { "Input": { "Width": 1589, "Silent": true, "Quality": "{number object}", "StampTimecode": false, "Height": 4349, "StampScale": "{number object}" } } }
- Encode (
HealthConfigEncode¶
-
HealthConfigEncode
Health Configuration Encode
Object Properties: - Input (
HealthConfigEncodeInput
) – Health Configuration Encode Input
{ "Input": { "Width": 3750, "Silent": false, "Quality": "{number object}", "StampTimecode": true, "Height": 8599, "StampScale": "{number object}" } }
- Input (
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
{ "Width": 6359, "Silent": false, "Quality": "{number object}", "StampTimecode": false, "Height": 6899, "StampScale": "{number object}" }