Custom Data Check

Custom data check is a flexible check that can query by any relation in configure8 system and custom data pushed via Data Flexibility schemas. This page contains logic and samples for it.

Description: This check compares a service's existing or dynamically calculated property against the specified value.

Learn more about calculated properties and custom data checks on that section in Data Flexibility docs here.

Property Type: Custom-calculated property, existing property

Existing property: All properties from System Inherited Data Model and Data Model JSON the Service schema.

Custom calculated property: You can create your own calculated property using relation in the Service schema or data in details property in the service entity.

The key info to navigate through the schemas relation is the relation name from the service side. You can check those relation names by going to Settings -> Add Schema -> Select service schema. Or entering your service schema in the list if already extended before.

Check in this quick video how you can see what information(Properties and Relations) are available in system schemas:

Comparison Type: Number, version, text, boolean

Threshold: Integer number, text, boolean

Example 1: Find the count of Snyk issues for service:

{
   "type": "FUNCTION",
   "aggregation": "COUNT",
   "path": "resources.snykIssues.id",
   "filter": []
}

Example 2: Query by path in service entity details property. Find count open incidents in PagerDuty for service:

{
   "type": "PATH",
   "path": "details.incidents.openedIncidents.PagerDuty"
}

Example 3: Find count resources filtering by type AWS:EKS:Cluster:

{
   "type": "FUNCTION",
   "aggregation": "COUNT",
   "path": "resources.id",
   "filter": [
     {
        "type": "compare",
        "field": "resources.providerResourceType",
        "value": "AWS:EKS:Cluster",
        "compare": "eq"
      }
   ]
}

Example 4: Find count resources in all environments that have the "app" Tag

{
  "type": "FUNCTION",
  "aggregation": "COUNT",
  "path": "resources.id",
  "filter": [
    {
      "type": "compare",
      "field": "resources.details.Tags",
      "value": "%app%",
      "compare": "like"
    }
  ]
}

Example 5: Do the average number of applications and environments of a service

You cannot nest Aggregations, so in this case we're making the average by dividing the count of applications and environments by 2

{
  "type": "MATH",
  "condition": "/",
  "values": [
    {
      "type": "MATH",
      "condition": "+",
      "values": [{
        "type": "FUNCTION",
        "aggregation": "COUNT",
        "path": "applications.id"
      },
      {
        "type": "FUNCTION",
        "aggregation": "COUNT",
        "path": "environments.id"
      }]
    },
    {
      "type": "NUMBER",
      "value": 2
    }
  ]
}

Example 6: Get Name of Latest Deploy by Stop time

{
  "type": "FUNCTION",
  "aggregation": "MAX_BY",
  "values": [
    {
      "type": "PATH",
      "path": "DeploysServices.name"
    },
    {
      "type": "PATH",
      "path": "DeploysServices.Stop"
    }
  ]
}

Example 7: Get latest (by stop time) Deploy Duration filtered by Environment and Branch

{
  "type": "FUNCTION",
  "aggregation": "MAX_BY",
  "values": [
    {
      "type": "PATH",
      "path": "DeploysServices.Duration"
    },
    {
      "type": "PATH",
      "path": "DeploysServices.Stop"
    }
  ],
  "filter": [
    {
      "type": "and",
      "conditions": [
        {
          "type": "compare",
          "field": "DeploysServices.Environment",
          "value": "prod",
          "compare": "eq"
        },
        {
          "type": "compare",
          "field": "DeploysServices.Branch",
          "value": "main",
          "compare": "eq"
        }
      ]
    }
  ]
}

DORA Metrics Scorecard Samples

All the following Scorecard checks relies on the custom data created by Deploys and Incidents schemas, which we have complete docs on how to build it. You need to complete the scorecard check with the threshold you want to apply for your services. You can also create multiple threshold to categorize your services in Bronze, Silver or Gold, for instance.

DORA Change Failure Rate (%)

Your change failure rate is the percentage of changes resulting in a fault, incident, or rollback.

Here are the suggested performance levels for change failure rate:

  • Bronze- up to 60%

  • Silver- 16%-30%

  • Gold- 0%-15%

{
  "type": "MATH",
  "condition": "*",
  "values": [
    {
      "type": "MATH",
      "condition": "/",
      "values": [
        {
          "type": "FUNCTION",
          "aggregation": "COUNT",
          "path": "ServiceIncidents.id"
        },
        {
          "type": "FUNCTION",
          "aggregation": "COUNT",
          "path": "ServiceDeploys.id"
        }
      ]
    },
    {
      "type": "NUMBER",
      "value": 100
    }
  ]
}

DORA Deployment Frequency Last Month

Deployment frequency measures how often you deploy to Production or to end users.

Here are suggested performance levels for deployment frequency:

  • Bronze- Higher than once per month

  • Silver- Higher than once per week

  • Gold- on-demand (many deploys per day)

{
  "type": "FUNCTION",
  "aggregation": "COUNT",
  "path": "ServiceDeploys.id",
  "filter": [
    {
      "type": "compare",
      "field": "ServiceDeploys.details.Stop",
      "value": {
        "function": "DAYS_SHIFT",
        "value": -30
      },
      "compare": "gte"
    }
  ]
}

DORA Lead time for changes

Lead time for changes is the median amount of time for a code change to be deployed into production.

{
  "type": "FUNCTION",
  "aggregation": "AVG",
  "path": "ServiceDeploys.details.Duration"
}

DORA Mean Time to restore

Mean time to restore service after service incidents, rollbacks, or any type of production failure happened.

{
  "type": "FUNCTION",
  "aggregation": "AVG",
  "path": "ServiceIncidents.details.Duration"
}

Last updated

Copyright © 2023 configure8, Inc. All rights reserved.