fettle v0.1.0 Fettle.Schema.FTHealthCheckV1 View Source

Implements the FT Health Check Schema V1.

JSON serialized output is of form:

{
  "schemaVersion": 1,
  "systemCode": "code",
  "name": "name of system",
  "decription": "description of system",
  "checks": [
    {
      "id": "healthcheck-id-1",
      "name": "healthcheck name",
      "ok": false,
      "severity": 1,
      "businessImpact": "description",
      "technicalSummary": "description",
      "panicGuide": "https://...",
      "checkOutput": "message from check",
      "lastUpdated": "2017-06-23T09:13:24Z"
    }
  ]
}

Most fields fairly obviously map to config, however:

  • checkOutput is the Fettle.Checker.Result.message field.
  • ok is false if the Fettle.Checker.Result.status is not :ok.
  • lastUpdated is the Fettle.Checker.Result.timestamp field as ISO-8601 UTC DateTime.

Note that the :warn and :error states are not exposed by this standard other than as the computed value of ok; the FT instead uses the (non-dynamic) severity to show different levels of alert on dash-boards, with the intention of using multiple checks for to distinguish between errors and warnings.

Link to this section Summary

Functions

Convert a list of check spec/result tuples into a particular output format, based on a list or a map

Link to this section Functions

Link to this function to_schema(config, results) View Source
to_schema(config :: Fettle.Config.t, results :: [Fettle.ScoreBoard.check]) :: Fettle.Schema.report

Convert a list of check spec/result tuples into a particular output format, based on a list or a map.

Typically the report will ultimately be serialized to JSON.

Callback implementation for Fettle.Schema.to_schema/2.